/*
* Headmanager.h
*
* Created by Joey van der Bie and Vincent Vijn
* www.vanderBie.net & Vincent.Vijn.me
* With code from Theo Watson, Jesus Gollonet and Diego Diaz
*
* 15-04-2010
* Media Technology - University Leiden
*/

#ifndef _HEAD_MANAGER_
#define _HEAD_MANAGER_


#include "ofMain.h"
#include "ofxCvMain.h"

#include "cv.h"

#define MAX_NUM_FACE_TO_FIND 1


//------------------------------
typedef struct {
	float 		x,y;
	float 		radius;
} faceInfo;

class headmanager {

		public:
			~headmanager(){
				delete fInfo;
			}
			void allocate(int width, int height);
			int* detect(ofxCvColorImage imag);
			void update();
			void draw(int width, int height) ;

			IplImage *gray;
			IplImage *small_img;

			const char* cascade_name;

			double scale;

			int nFaces;
			CvSeq* faces;

			faceInfo			* fInfo;
			int camW;
			int camH;

};
#endif
